﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<!--[if lt IE 9]>
      <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
<title>完善个人信息</title>
<!-- 新 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet"
	href="${ctx }/plugin/bootstrap/3.3.5/css/bootstrap.min.css">

</head>
<body>
	<div class="container">
		<div class="row clearfix">
			<div class="col-md-12 column">
				<div class="page-header">
					<h1>
						B2C网上商城 <small>Online Shopping Mall</small>
					</h1>
				</div>				
				<!-- 轮播图 -->
				<%@ include file="carousel.jsp" %>
				<hr />
				<!-- 导航栏 -->
				<jsp:include page="nav.jsp"></jsp:include>
			</div>
		</div>
		<hr>
		<div class="row clearfix">
			<!-- 商品分类 -->
			<%@ include file="category.jsp" %>
			
			<div class="col-md-10 column">
				<div class="panel panel-info">
					<div class="panel-heading">完善 ${user.name} 的个人信息</div>
					<div class="panel-body">
						<form class="form-horizontal" role="form" action="${ctx }/user/userAddInfo.do"  method="post">
							<input type="hidden" name="id" value="${user.id}"/>
							
							<div class="form-group">
								<label for="address" class="col-md-2 control-label">地址</label>
								<div class="col-md-4">
									<input type="text" class="form-control" id="address"
										name="address" maxlength="50" value="${user.address}" />
								</div>
							</div>
							<div class="form-group">
								<label for="postcode" class="col-md-2 control-label">邮编</label>
								<div class="col-md-4">
									<input type="text" class="form-control" id="postcode"
										name="postcode" maxlength="10" value="${user.postcode}" />
								</div>
							</div>
							<div class="form-group">
								<label for="homephone" class="col-md-2 control-label">家庭电话</label>
								<div class="col-md-4">
									<input type="text" class="form-control" id="homephone"
										name="homephone" maxlength="16" value="${user.homephone}" />
								</div>
							</div>
							<div class="form-group">
								<label for="officephone" class="col-md-2 control-label">办公电话</label>
								<div class="col-md-4">
									<input type="text" class="form-control" id="officephone"
										name="officephone" maxlength="16" value="${user.officephone}" />
								</div>
							</div>
							<div class="form-group">
								<div class="col-sm-offset-2 col-sm-10">								
									<button type="submit" class="btn btn-primary">保存</button>
								</div>
							</div>			
						</form>
					</div>
				</div>
				<font id="msg" color="red">${msg }</font>
			</div>
		</div>
	</div>

	<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
	<script src="${ctx }/plugin/jquery/1.11.3/jquery.min.js"></script>
	<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
	<script src="${ctx }/plugin/bootstrap/3.3.5/js/bootstrap.min.js"></script>
	<script src="${ctx }/js/user.js"></script>
</body>
</html>